/*
 * @lc app=leetcode.cn id=492 lang=cpp
 *
 * [492] 构造矩形
 */

// @lc code=start
class Solution
{
public:
  vector<int> constructRectangle(int area)
  {
    int L = ceil(sqrt(area));
    while (area % L != 0)
      ++L;
    return {L, area / L};
  }
};
// @lc code=end
